/*
 *                               POK header
 * 
 * The following file is a part of the POK project. Any modification should
 * made according to the POK licence. You CANNOT use this file or a part of
 * this file is this part of a file for your own project
 *
 * For more information on the POK licence, please see our LICENCE FILE
 *
 * Please follow the coding guidelines described in doc/CODING_GUIDELINES
 *
 *                                      Copyright (c) 2007-2009 POK team 
 *
 * Created by julien on Tue Nov 24 21:49:41 2009 
 */

#include <core/partition.h>
#include <core/error.h>
#include <core/kernel.h>
/*****************************************************/
/*  This file was automatically generated by Ocarina */
/*  Do NOT hand-modify this file, as your            */
/*  changes will be lost when you re-run Ocarina     */
/*****************************************************/

/**************************/
/* pok_partition_error   */ 
/*************************/

void pok_partition_error 
    (uint8_t partition,
    uint32_t error)
{

  switch (partition)
  {
    case 0:
    {
      switch (error)
      {
        case POK_ERROR_KIND_PARTITION_CONFIGURATION:
        {
          pok_partition_set_mode (0, POK_PARTITION_MODE_INIT_WARM);

          break;
        }
        case POK_ERROR_KIND_PARTITION_INIT:
        {
          pok_partition_set_mode (0, POK_PARTITION_MODE_INIT_WARM);

          break;
        }
        case POK_ERROR_KIND_PARTITION_HANDLER:
        {
          pok_partition_set_mode (0, POK_PARTITION_MODE_INIT_WARM);

          break;
        }
        case POK_ERROR_KIND_PARTITION_SCHEDULING:
        {
          pok_partition_set_mode (0, POK_PARTITION_MODE_INIT_WARM);

          break;
        }
      }

      break;
    }
    case 1:
    {
      switch (error)
      {
        case POK_ERROR_KIND_PARTITION_CONFIGURATION:
        {
          pok_partition_set_mode (1, POK_PARTITION_MODE_INIT_WARM);

          break;
        }
        case POK_ERROR_KIND_PARTITION_INIT:
        {
          pok_partition_set_mode (1, POK_PARTITION_MODE_INIT_WARM);

          break;
        }
        case POK_ERROR_KIND_PARTITION_HANDLER:
        {
          pok_partition_set_mode (1, POK_PARTITION_MODE_INIT_WARM);

          break;
        }
        case POK_ERROR_KIND_PARTITION_SCHEDULING:
        {
          pok_partition_set_mode (1, POK_PARTITION_MODE_INIT_WARM);

          break;
        }
      }

      break;
    }
  }
}


/***********************/
/* pok_kernel_error   */ 
/**********************/

void pok_kernel_error 
    (uint32_t error)
{

  switch (error)
  {
    case POK_ERROR_KIND_KERNEL_CONFIG:
    {
      pok_kernel_restart ();

      break;
    }
    case POK_ERROR_KIND_KERNEL_INIT:
    {
      pok_kernel_restart ();

      break;
    }
    case POK_ERROR_KIND_KERNEL_SCHEDULING:
    {
      pok_kernel_restart ();

      break;
    }
  }
}


